package course.d1222;
/*
    如果捕获多个异常对象。必须是子类在前，父类在后
 */
public class p5 {
    public static void main(String[] args) {
          try{
              String s = null;
              System.out.println(s.length());
          }catch (NullPointerException e){
              System.out.println("捕获了一个空指针异常");
          }catch (Exception e){
              System.out.println("出现异常");
          }
    }
}
